//---------------------------------------------------------------------------- // File: C3DObject.h // Class: C3DObject -- An simple object that contains vertices & textures. // Type: 3D Object // Author: Ken Anderson // Date: 11/25/2005 // OS dependant: NA // Desc: A class designated for creating a simple 3d object equipped with // vertices and textures. // // Revisions // v1.0[11/25/05] -- Creation of class. // // Required headers: // 1) C3DVertices.h -- A link to the vertices required to create a 3d object. // 2) C3DTextures.h -- A link to a texture to wrap around the 3d object. //---------------------------------------------------------------------------- #ifndef __C3DOBJECT__ #define __C3DOBJECT__ /////////////// // INCLUDES // /////////////// #include "OS_Global.h" #include "C3DVertices.h" #include "C3DTextures.h" #include "C3DIndices.h" #include "Common.h" /////////////////// // ENUMERATIONS // /////////////////// typedef enum C3DObject_Type { C3DOT_TEXT, C3DOT_BIN, C3DOT_XFILE, C3DOT_UNKNOWN, } C3DObjectType; class C3DObject { private: C3DVertices* m_pVerts; C3DTextures* m_pTex; C3DIndices* m_pIds; SC3DVertex3f m_vCurrPos; SC3DVertex3f m_vDestPos; SC3DVertex3f m_vStartPos; C3DFillMode m_FillMode; public: C3DObject(); C3DObject(const C3DObject& object); ~C3DObject(); //Object actions C3DERR Create(); void Destroy(); void Render(C3DFillMode FillMode=C3DFILL_SOLID); //Object modifications C3DERR SetTexture(Dword dwIndex, cstr strFileName) {return C3DERR_NA;} C3DERR Vertex3f(float x, float y, float z) {return C3DERR_NA;} C3DERR Vertex3f(Dword dwIndex, float x, float y, float z) {return C3DERR_NA;} //Object files. C3DERR LoadObjectFromFile(string& sFileName); private: void Init(); void Cleanup(); C3DERR LoadTextFromFile(string& sFileName); //C3DERR LoadBinFromFile(cstr pFileName){return C3DERR_NA;} C3DObjectType CheckFileType(string& sFileName); }; #endif